﻿using MCPlatform.MotionLib.Base;
using Panuon.WPF;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MCPlatform.UI.Controls.Models
{
    public class TestTrayModel : NotifyPropertyChangedBase
    {
        #region Properties
        public ObservableCollection<TrayModel> FirstRowItems { get => _FirstRowItems; set => Set(ref _FirstRowItems, value); }
        private ObservableCollection<TrayModel> _FirstRowItems = new ObservableCollection<TrayModel>();

        public ObservableCollection<TrayModel> SecondRowItems { get => _SecondRowItems; set => Set(ref _SecondRowItems, value); }
        private ObservableCollection<TrayModel> _SecondRowItems = new ObservableCollection<TrayModel>();

        public ObservableCollection<TrayModel> ThirdRowItems { get => _ThirdRowItems; set => Set(ref _ThirdRowItems, value); }
        private ObservableCollection<TrayModel> _ThirdRowItems = new ObservableCollection<TrayModel>();


        public ObservableCollection<TrayModel> FourthRowItems { get => _FourthRowItems; set => Set(ref _FourthRowItems, value); }
        private ObservableCollection<TrayModel> _FourthRowItems = new ObservableCollection<TrayModel>();


        public ObservableCollection<TrayModel> FifthRowItems { get => _FifthRowItems; set => Set(ref _FifthRowItems, value); }
        private ObservableCollection<TrayModel> _FifthRowItems = new ObservableCollection<TrayModel>();

        public ObservableCollection<TrayModel> SixthRowItems { get => _SixthRowItems; set => Set(ref _SixthRowItems, value); }
        private ObservableCollection<TrayModel> _SixthRowItems = new ObservableCollection<TrayModel>();

        public ObservableCollection<TrayModel> SeventhRowItems { get => _SeventhRowItems; set => Set(ref _SeventhRowItems, value); }
        private ObservableCollection<TrayModel> _SeventhRowItems = new ObservableCollection<TrayModel>();

        public Dictionary<int, ObservableCollection<TrayModel>> RowItemsMap { get; set; } = new Dictionary<int, ObservableCollection<TrayModel>>();
       
        #endregion

        #region CTOR

        public TestTrayModel()
        {
            for (int i = 0; i < 2; i++)
            {
                FirstRowItems.Add(new TrayModel());
                SeventhRowItems.Add(new TrayModel());
            }

            for (int i = 0; i < 5; i++)
            {
                SecondRowItems.Add(new TrayModel());
                FourthRowItems.Add(new TrayModel());
                SixthRowItems.Add(new TrayModel());
            }

            for (int i = 0; i < 6; i++)
            {
                ThirdRowItems.Add(new TrayModel());
                FifthRowItems.Add(new TrayModel());
            }

            RowItemsMap.Add(1, FirstRowItems);
            RowItemsMap.Add(2, SecondRowItems);
            RowItemsMap.Add(3, ThirdRowItems);
            RowItemsMap.Add(4, FourthRowItems);
            RowItemsMap.Add(5, FifthRowItems);
            RowItemsMap.Add(6, SixthRowItems);
            RowItemsMap.Add(7, SeventhRowItems);
        }
        #endregion
    }
}
